<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet" href="/css/userweb/common.css">
    <link rel="stylesheet" href="/css/userweb/indexHeader.css">
    <style type="text/css">
        [v-cloak] {
            display: none;
        }
    </style>
</head>
<body>
    <div class="header" id="headerVue" v-cloak>
        <div class="header_bar_container">
            <div class="header_bar">
                <ul class="header_bar_left">
                    <li>
                        <span class="header_bar_phone">
                            <img src="/image/userweb/slicesImg/phone.png" alt="">
                        </span>
                        <p>{{tel}}</p>
                    </li>
                    <li>
                         <span class="header_bar_icon">
                            <img src="/image/userweb/slicesImg/emil.png" alt="">
                        </span>
                        <p>{{email}}</p>
                    </li>
                </ul>
                <ul class="header_bar_right" v-show="login">
                    <li>
                        <a :href="'/userweb/index/login.html'">
                            <div class="head_btn_title">登录/login</div>
                        </a>

                    </li>
                    <li>
                        <a :href="'/userweb/index/register.html'">
                            <div class="head_btn_title">注册/register</div>
                        </a>
                    </li>
                </ul>
                <ul class="header_bar_right" v-show="logout">
                    <li>
                        <a :href="'/userweb/index/index.html'" onclick="logOut()">
                            <div class="head_btn_title">退出登录/logout</div>
                        </a>
                    </li>
                </ul>
            </div>
        </div>

        <!--导航-->
        <div class="header_nav_container">
            <div class="header_nav_box">
                <div class="logo" onclick="homePage()">
                    <span>小货郎</span>
                </div>
                <div class="my_address">
                     <span class="my_address_icon">
                            <img src="/image/userweb/slicesImg/address.png" alt="">
                        </span>
                    <p>{{city}}</p>
                </div>
                <div class="header_nav">
                    <ul>
                        <li id="index">
                            <a :href="'/userweb/index/index.html'">
                                <div class="title_zh">首页</div>
                                <div class="title_en">Home</div>
                            </a>
                        </li>
                        <li id="purchase">
                            <a :href="'/userweb/index/purchaseIndex.html'">
                                <div class="title_zh">购货</div>
                                <div class="title_en">Purchase</div>
                            </a>
                        </li>
                        <li id="shoppingCar">
                            <a :href="'/userweb/index/shoppingCar.html'">
                                <div class="title_zh">购货车</div>
                                <div class="title_en">Shopping Cart</div>
                            </a>
                        </li>
                        <li id="my">
                            <a :href="'/userweb/index/myInfo.html'">
                                <div class="title_zh">我的</div>
                                <div class="title_en">Mine</div>
                            </a>
                        </li>
                        <li class="shop_search">
                            <input type="text" v-model="searchs" placeholder="搜索/search">
                            <div class="shop_search_btn">
                                <a :href="'/userweb/index/index.html?search='+searchs">搜索/search</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="/js/vue.js"></script>
<script src="/js/vue-resource.js"></script>
<script src="/js/userweb/jquery.min.js"></script>
<script src="/js/userweb/common.js"></script>
<script src="/js/userweb/common/indexHeader.js"></script>
<script>
    function logOut() {
       localStorage.removeItem('user_id');
       localStorage.removeItem('user_name');
       localStorage.removeItem('user_image');
       localStorage.removeItem('web_token');
       localStorage.removeItem('city');
    }
    function homePage() {
        location.href = "/userweb/index/index.html";
    }
</script>
</html>